<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>函数的定义</title>
    
</head>
<body>
    <script type="text/javascript">
        // 函数 封装重复性代码 减少冗余
        function func1() {
            var i = 1;;
            alert('做饭' + i + '次');
        }
        func1();
        func1();
        func1();
    </script>
</body>
</html>